package com.atguigu.springcloud.service;

import com.sun.org.apache.xpath.internal.SourceTreeManager;
import org.springframework.stereotype.Component;

/**
 * @USER: dayu
 * @DATE: 2020/3/27
 * @DESCRIPTION: 实现feign调用接口，用于写服务降级
 */
@Component
public class OrderHystrixServiceImpl implements OrderHystrixService {
    @Override
    public String getOk(Long id) {
        System.out.println("OrderHystrixServiceImpl.getOk");
        return "=====OrderHystrixServiceImpl.getOk======服务降级了";
    }

    @Override
    public String getTimeout(Long id) {
        System.out.println("OrderHystrixServiceImpl.getTimeout");
        return "=====OrderHystrixServiceImpl.getTimeout======服务降级了，等待结果。。。。。";
    }
}
